package com.yyi.springcloud.service.impl;


import com.yyi.springcloud.dao.SubWindowConfigMapper;
import com.yyi.springcloud.entities.SubWindowConfigModel;
import com.yyi.springcloud.entities.WindowConfigModel;
import com.yyi.springcloud.service.Local_SubWindowConfigService;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;
import java.util.List;

@Service
public class Local_SubWindowConfigServiceImpl implements Local_SubWindowConfigService {

    @Resource
    private SubWindowConfigMapper subWindowConfigMapper;

    public SubWindowConfigMapper getSubWindowConfigMapper() {
        return subWindowConfigMapper;
    }

    public void setSubWindowConfigMapper(SubWindowConfigMapper subWindowConfigMapper) {
        this.subWindowConfigMapper = subWindowConfigMapper;
    }

    @Override
    public List<SubWindowConfigModel> getSubWindowConfigModelByCondition(SubWindowConfigModel subWindowConfigModel) {
        Example example = new Example(WindowConfigModel.class);
//        example.orderBy("testunitno").asc();
//        example.createCriteria().andLike("primarykey",testDate+"%");
        return subWindowConfigMapper.select(subWindowConfigModel);
    }
}
